package com.bulletelc.apollopre.module.main.center.bargain;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.bulletelc.apollopre.R;
import com.bulletelc.apollopre.framework.MVPBaseActivity;
import com.bulletelc.apollopre.module.main.center.setting.SettingActivity;
import com.bulletelc.apollopre.utils.ToastUtil;
import com.bulletelc.apollopre.widget.FoolBar;

/**
 * author: lyx
 * date  : 2018-06-22
 * desc  : bargain 砍价
 */
public class BargainActivity extends MVPBaseActivity<BargainContract.View, BargainPresenter> implements BargainContract.View,View.OnClickListener,
        FoolBar.ClickCallback {

    //view
    private FoolBar flBar;
    private Button btn;
    private TextView tv;
    @Override
    public int getLayoutRes() {
        return R.layout.bargain_main;
    }

    @Override
    public void assignViews() {
        flBar = findView(R.id.flBar);
        btn=findViewById(R.id.bargin_btn);
        tv=findViewById(R.id.bargain_text);
//        flBar = findView(R.id.flBar);
//        lvQuotation = findView(R.id.lvQuotation);
//        tvTotal = findView(R.id.tvTotal);
//        tvEdit = findView(R.id.tvEdit);
//        btnCancel = findView(R.id.btnCancel);
//        btnPay = findView(R.id.btnPay);
    }

    @Override
    public void setListener() {
        flBar.setClickCallback(this);
        btn.setOnClickListener(this);
//        flBar.setClickCallback(this);
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        flBar.setTitle("test");
        //presenter.persenterTest();
//        flBar.setTitle("定制报价清单");
    }
    public void ToastDetails(){
        presenter.persenterTest();
    }
    @Override
    public void onLeftClick() {
        finish();
    }

    @Override
    public void onRightClick() {

    }

    @Override
    public void onSuccessIntentList() {

    }

    @Override
    public void onErrorIntentList(String error) {

    }

    @Override
    public void onFailIntentList(String fail) {

    }

    @Override
    protected BargainPresenter createPresenter() {
        return new BargainPresenter();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.bargin_btn:
                ToastDetails();
            break;

        }
    }
}
